<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/17 0017
 * Time: 13:52
 */
namespace app\admin\model;
use think\Db;

class Bank
{
    /**删除题目
     * @param $where
     * @return bool
     */
    static public function del($field, $op = null, $condition = null){
        $data = Db::name('bank')->where($field,$op,$condition)->select();
        foreach ($data as $value){
            if($value['picture']){
                if(!UpFile::delFile($value['picture'])){
                    return false;
                };
            }
        }
        return true;
    }
}